<template>
  <CardList :dataList="danceList"></CardList>
</template>

<script setup lang="ts">
  import CardList from '../../../CardList/index.vue';
  import {onMounted, ref} from 'vue'
  import type { TabsPaneContext } from 'element-plus';
  import {ElMessage} from "element-plus";
  import DanceListApi from '@/api/rescources/DanceList';
  const activeName = ref('first')
  const pageSize = ref(20);
  const pageNum = ref(0);
  const column = ref<any>('original');
  const danceList = ref<any>([]);

  const getWorksList = async () => {
    try {
      const result = await DanceListApi.getAggressiveList("5858c60a-7a7c-4593-869e-3019e126c4f2",pageSize.value,pageNum.value,column.value)

      danceList.value = result.content
    } catch (error) {
      console.error(error);
      ElMessage.error('获取作品列表数据失败')
    }
  }

  onMounted(() => {

    getWorksList()
  })

  // https://www.dance365.com/apis/moment/moments/collect/original/newcomer?access_token=c494ae44-3adc-48ca-8749-5128a53358d7&pageSize=20&pageNum=0&column=original
</script>

<style scoped>

</style>
